function [roc,n]=cvroc_t(obs,pred,t,tt,plt,salto)

% function [roc,n]=cvroc_t(obs,pred,t,{tt},{plt},{salto})
% version of cvroc with time cutoffs, tt

if nargin<4
    tt=max(t)
end

if nargin<5
    plt=1;
end

if nargin<6
    salto=0.05;
end

obst=obs(find(t<=tt));
predt=pred(find(t<=tt));
roc=cvroc(obst,predt,plt,salto);
n=[sum(obst),length(obst)-sum(obst)];